﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.TcCommands.TcReplaceJt.CApTcReplaceJtViewModel
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.Collections.Generic;
using System.ComponentModel;


namespace DnProcessSimulateCommands.TcCommands.TcReplaceJt;

public class CApTcReplaceJtViewModel : INotifyPropertyChanged
{
  private CApTcReplaceJtModel m_model;

  public CApTcReplaceJtViewModel(CApTcReplaceJtModel model) => this.m_model = model;

  public event PropertyChangedEventHandler PropertyChanged;

  protected virtual void OnPropertyChanged(string propertyName)
  {
    if (this.PropertyChanged == null)
      return;
    this.PropertyChanged((object) this, new PropertyChangedEventArgs(propertyName));
  }

  public string NewJtPath
  {
    get => this.m_model.NewJtPath;
    set
    {
      this.m_model.NewJtPath = value;
      this.OnPropertyChanged(nameof (NewJtPath));
    }
  }

  public string CurrentJtName => this.m_model.CurrentJtName;

  public List<string> Instances => this.m_model.Instances;

  public bool IsReplaceMode => this.m_model.DoesHaveJT;

  public string NewJtButtonText
  {
    get
    {
      return this.IsReplaceMode ? TcReplaceJtStringTable.DLG_REPLACE_BUTTON_MODE_REPLACE : TcReplaceJtStringTable.DLG_REPLACE_BUTTON_MODE_SET;
    }
  }

  public string NewJtLabelText
  {
    get
    {
      return this.IsReplaceMode ? TcReplaceJtStringTable.DLG_NEW_JT_LABEL_MODE_REPLACE : TcReplaceJtStringTable.DLG_NEW_JT_LABEL_MODE_SET;
    }
  }
}
